{extend name='main'}

{block name="button"}


<!--<button class="layui-btn" data-submit-role  type='submit' onclick="$('form.mainForm').submit()">保存</button>-->
<button class="layui-btn layui-btn-danger" type='button' onclick="window.history.back()">返回</button>


{/block}

{block name="content"}
<div class="think-box-shadow">
    <div class="layui-title">客户信息</div>
    <form class="layui-form-type layui-form mainForm" data-auto="true" data-callback="submitCallback" >
        <div class="list layui-form-item">
            <div class="list-title"><span></span>基本信息</div>
            <div class="layui-row ">
            	{notempty name='vo.id'}
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">客户编号：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="unique" lay-verify="" disabled required placeholder="请输入客户编号" autocomplete="off" value='{$vo.unique|default=""}'
                                   class="layui-input">
                        </div>
                    </div>
                </div> 
                {/notempty}
            	<!--{notempty name='vo.id'}
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">负责人：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="charger" class="layui-select" required disabled lay-search lay-filter="charger">
                            	<option style="display: none" value="">请选择负责人</option>
                                {foreach $chargers as $k=>$v}
				                {if (isset($vo.charger) and $vo.charger eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                {/notempty}-->
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">公司名称：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="company_name" lay-verify="" disabled required placeholder="请输入公司名称" autocomplete="off" value='{$vo.company_name|default=""}'
                                   class="layui-input">
                        </div>
                    </div>
                </div> 
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">联系人姓名：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="link_name" lay-verify="" disabled required placeholder="请输入联系人姓名" autocomplete="off" value='{$vo.link_name|default=""}'
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">客户类型：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="post_type" class="layui-select" required  lay-filter="post_type" disabled>
                            	<option style="display: none" value="">请选择客户类型</option>
                                {foreach $post_type as $k=>$v}
				                {if (isset($vo.post_type) and $vo.post_type eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">国家：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="country" class="layui-select" required  lay-filter="countrys" disabled>
                            	<option style="display: none" value="">请选择国家</option>
                                {foreach $countrys as $k=>$v}
				                {if (isset($vo.country) and $vo.country eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">城市：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="city" lay-verify="" disabled required placeholder="请输入城市" autocomplete="off" value='{$vo.city|default=""}'
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">来源渠道：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="source_type" class="layui-select" required  lay-filter="source_types" disabled>
                            	<option style="display: none" value="">请选择来源渠道</option>
                                {foreach $source_types as $k=>$v}
				                {if (isset($vo.source_type) and $vo.source_type eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <!--<div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">是否成交：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="transaction" class="layui-select" required lay-search lay-filter="transactions">
                            	<option style="display: none" value="">请选择是否成交</option>
                                {foreach $transactions as $k=>$v}
				                {if (isset($vo.transaction) and $vo.transaction eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>-->
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">成交金额：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="amount" lay-verify="" disabled  placeholder="请输入成交金额" autocomplete="off" value='{$vo.amount|default=""}'
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">微信号：</label>
                        <div class="layui-input-inline seller-inline-6 ">
                            <input type="text" name="wechat" lay-verify=""  disabled placeholder="请输入微信号" value="{$vo.wechat|default=""}"
                                   autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">手机号码：</label>
                        <div class="layui-input-inline seller-inline-6 ">
                            <input type="text" name="mobile" lay-verify="" disabled placeholder="请输入手机号码" value="{$vo.mobile|default=""}"
                                   autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">WhatsApp：</label>
                        <div class="layui-input-inline seller-inline-6 ">
                            <input type="text" name="whatsapp" lay-verify="" disabled placeholder="请输入WhatsApp账号" value="{$vo.whatsapp|default=""}"
                                   autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">电子邮箱：</label>
                        <div class="layui-input-inline seller-inline-6 ">
                            <input type="text" name="email" lay-verify="" disabled placeholder="请输入电子邮箱" value="{$vo.email|default=""}"
                                   autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                
                
            </div>
        </div>
        <div class="list layui-form-item">
            <div class="list-title"><span></span>沟通信息</div>
            <div class="layui-row ">
                <div class="layui-col-md4">
                    <div class="layui-inline layui-form-item ">
                        <label class="layui-form-label label-required-prev">首触时间：</label>
                        <div class="layui-input-inline  seller-inline-6">
                            <input data-date-input="" name="first_contact_at" disabled value="{$vo.first_contact_at|default=""}" required
                            placeholder="请选择首触时间" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label "> 产品咨询：</label>                        
                        <div class="layui-input-inline seller-inline-6">
	                        <div class="layui-input-inline" style="width: 100%">
	                            <textarea name="product_inquiry" placeholder="" disabled class="layui-textarea">{$vo.product_inquiry|default=""}</textarea>
	                        </div>
	                    </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label "> 需求描述：</label>                      
                        <div class="layui-input-inline seller-inline-6">
	                        <div class="layui-input-inline" style="width: 100%">
	                            <textarea name="demand_desc" placeholder="" disabled class="layui-textarea">{$vo.demand_desc|default=""}</textarea>
	                        </div>
	                    </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label label-required-prev">意向程度：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <select name="intention_level" class="layui-select" required disabled>
                                <option style="display: none" value="">请选择意向程度</option>
                                {foreach $intention_level as $k=>$v}
				                {if (isset($vo.intention_level) and $vo.intention_level eq $k)}
				                <option selected value="{$k}">{$v}</option>
				                {else}
				                <option value="{$k}">{$v}</option>
				                {/if}
				                {/foreach}
                            </select>

                        </div>
                    </div>
                </div>
              
                
            </div>
        </div>
        
        
        <div class="list layui-form-item">
            <div class="list-title"><span></span>交易信息</div>
            <div class="layui-row ">
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label "> 公司唛头：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="company_mark"  disabled  placeholder="请输入公司唛头" autocomplete="off" value="{$vo.company_mark|default=""}"
                                   class="layui-input dutynum requiredChange">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label "> 货运姓名：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="freight_name" disabled   placeholder="请输入货运姓名" autocomplete="off" value="{$vo.freight_name|default=""}"
                                   class="layui-input dutynum requiredChange">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label "> 货运电话：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text" name="freight_tel"   disabled placeholder="请输入货运电话" autocomplete="off" value="{$vo.freight_tel|default=""}"
                                   class="layui-input dutynum requiredChange">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md8">
                    <div class="layui-inline ">
                        <label class="layui-form-label ">货运地址：</label>
                        <div class="layui-input-inline seller-inline-11">
                            <input type="text" name="freight_address" disabled placeholder="请输入货运地址" autocomplete="off" value="{$vo.freight_address|default=""}"
                                   class="layui-input zhucedi requiredChange">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        
        <div class="list layui-form-item">
            <div class="list-title"><span></span>跟进信息</div>
            <div class="layui-row ">
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label "> 跟进次数：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input type="text"   disabled="disabled"  placeholder="请输入跟进次数" autocomplete="off" value="{$vo.follow_num|default=""}"
                                   class="layui-input dutynum requiredChange">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label "> 最后跟进时间：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input=""  disabled="disabled" value="{$vo.last_follow_at|default=""}" 
                            placeholder="请选择最后跟进时间" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-inline ">
                        <label class="layui-form-label "> 最后进入公海时间：</label>
                        <div class="layui-input-inline seller-inline-6">
                            <input data-date-input=""  disabled="disabled" value="{$vo.last_sea_at|default=""}" 
                            placeholder="请选择到期时间" 
                            class="layui-input" autocomplete="off">
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="list layui-form-item">
            <div class="list-title"><span></span>备注信息</div>
            <div class="layui-row ">
                <div class="layui-col-md12">
                    <div class="layui-inline " style="width: 100%">
                        <div class="layui-input-inline" style="width: 100%">
                            <textarea name="desc" placeholder="" disabled class="layui-textarea">{$vo.desc|default=""}</textarea>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <div class="list layui-form-item">
            <div class="list-title"><span></span>操作记录</div>
            <div class="layui-row ">
                <div class="layui-col-md12">
                    <div class="layui-inline " style="width: 100%">
                        <div class="layui-input-inline" style="width: 100%">
                            <div class="record">
                            	{notempty name='oplog'}
                            	{foreach $oplog as $k=>$v}
			                     	<p>{$v.create_at|format_datetime}&nbsp;&nbsp;&nbsp;&nbsp;{$v.nickname}&nbsp;&nbsp;&nbsp;&nbsp;{$v.content}</p>
			                    {/foreach}
			                    {/notempty}
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <input type='hidden' class="status" {notempty name='vo.status'}value='{$vo.status}'{else/}value='1'{/notempty} name='status'>
        {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    </form>

</div>
{/block}

{block name="script"}
<script src="__ROOT__/static/admin/market/f-companyaudit.js"></script>
<script>

    form.on('select(account_type)', function(data){
      
        console.log(data.value); //得到被选中的值
        if(data.value==2){
            $("[name='master']").removeAttr("disabled").attr("required",'required');
            $(".masterTitle").addClass("label-required-prev")
          
        }else{
            $("[name='master']").attr("disabled",'disabled').removeAttr("required");
            $(".masterTitle").removeClass("label-required-prev")
            $("[name='master']").val("");
        }
        form.render();

    });      
    form.render();
</script>

{/block}

{block name="style"}
<style>
    .label-required:after, .label-required-next:after{
        content: "";
    }
    .payBack {
        background: #ffecea;
        margin-bottom: 15px;
    }

    .payBack-title {
        padding-bottom: 10px;
        padding-top: 10px;
        padding-left: 20px;
        color: #FF3030;
    }

    .payBack-title span {
        display: inline-block;
        width: 3px;
        background: #FF3030;
        height: 14px;
        vertical-align: middle;
        margin-right: 15px;
        margin-top: -3px;
    }
</style>
{/block}